
找rpm包
https://www.rpmfind.net/linux/rpm2html/search.php?query=unzip&submit=Search+...&system=centos&arch=

tar -zxvf mpich2-1.4.1p1.tar.gz
cd mpich2-1.4.1p1
./configure --prefix=指定mpich2安装路径
make 
make install


yum下载rpm包
yum install --downloadonly --downloaddir=/root screen



 wget https://poc-resource.obs.cn-south-1.myhuaweicloud.com/%E9%95%9C%E5%83%8F/llama2_7b_pt_ascendspeed.tar

for ((i=0;i<8;i++));do echo "device_id=$i" ;hccn_tool -i ${i} -tls -g ;done |grep switch


##悟空画画loar微调

###安装微调包

```
git clone https://github.com/mindspore-lab/mindpet.git
cd mindpe
python3 set_up.py bdist_wheel
pip install dist/mindpet-1.0.0-py3-none-any.whl
```


###单卡训练
修改scripts/run_train_lora.sh
output路径为绝对路径
```
vi scripts/run_train_lora.sh
output_path=/home/wubain/bigModel/train/minddiffusion/vision/wukong-huahua/output/
```

###FFAQ数据

```
cd /data
wget https://opt-release.obs.cn-central-221.ovaijisuan.com:443/FFHQ.tar.gz
unzip FFHQ.tar.gz
```

###多卡训练

```
#修改scripts/run_train_parallel_lora.sh output参数、dataset参数
output_path=/home/wubain/bigModel/train/minddiffusion/vision/wukong-huahua/output/
data_path=/data/FFHQ/
#生成rank_tablefile
git clone https://gitee.com/AmazingBian/ImageNet2012Preprocess
python3 ImageNet2012Preprocess/hccl_tools.py
#运行代码
bash scripts/run_train_parallel_lora.sh 8 0,1,2,3,4,5,6,7 hccl_8p_01234567.json
```




https://github.com/DagnyT/hardnet/raw/master/pretrained/train_liberty_with_aug/checkpoint_liberty_with_aug.pth

https://repo.mindspore.cn/mindspore/mindspore/daily/202307/20230709/r2.0_20230709161541_c500a7b2dcbb2d8e53afea562dd51bd5a7e0b26c_newest/lite/linux_aarch64/cloud_fusion/python37/

https://repo.huaweicloud.com/python/3.7.5/Python-3.7.5.tgz


##安装CANN
```

yum install -y gcc 
yum install -y gcc-c++ 
yum install -y make 
yum install -y cmake 
yum install -y unzip 
yum install -y zlib-devel 
yum install -y libffi-devel 
yum install -y openssl-devel 
yum install -y pciutils net-tools 
yum install -y sqlite-devel 
yum install -y lapack-devel 
yum install -y cc-gfortran


wget https://repo.huaweicloud.com/python/3.7.5/Python-3.7.5.tgz --no-check-certificate
tar -zxvf Python-3.7.5.tgz
cd Python-3.7.5
./configure --prefix=/usr/local/python3.7.5 --enable-loadable-sqlite-extensions --enable-shared
make -j120
make install


export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/python3.7.5/bin:$PATH
pip3 install --upgrade pip
pip3 install attrs
pip3 install cython
pip3 install numpy
pip3 install decorator
pip3 install sympy
pip3 install cffi
pip3 install pyyaml
pip3 install pathlib2
pip3 install psutil
pip3 install protobuf
pip3 install scipy
pip3 install requests
pip3 install absl-py
```

##日志收集：
```
npu-smi info -t health -i 0 -c 0
msnpureport -f
dmesg>dmesg.log
```




































